import { reactive } from 'vue'

function counterStore() {
  const state = reactive({ count: 0 })
  const add = (): void => {
    state.count++
  }
  return { state, add }
}

// 采用单例模式
export default counterStore()
